import request from '@/utils/request'

// 查询群组列表
export function listChatGroup(query) {
  return request({
    url: '/system/chatGroup/list',
    method: 'get',
    params: query
  })
}

// 查询群组详细
export function getChatGroup(groupId) {
  return request({
    url: '/system/chatGroup/' + groupId,
    method: 'get'
  })
}

// 新增群组
export function addChatGroup(data) {
  return request({
    url: '/system/chatGroup',
    method: 'post',
    data: data
  })
}

// 修改群组
export function updateChatGroup(data) {
  return request({
    url: '/system/chatGroup',
    method: 'put',
    data: data
  })
}

// 删除群组
export function delChatGroup(groupId) {
  return request({
    url: '/system/chatGroup/' + groupId,
    method: 'delete'
  })
}
